package daotests;

import java.util.List;

import tests.IEnviroment;
import tests.User;

public class UsersManagement {
	List<User> users;
	IGenericDao<User> genericDao;
	IEnviroment enviroment;
	
	public IEnviroment getEnviroment() {
		return enviroment;
	}


	public void setEnviroment(IEnviroment enviroment) {
		this.enviroment = enviroment;
	}


	public IGenericDao<User> getGenericDao() {
		return genericDao;
	}


	public void setGenericDao(IGenericDao<User> genericDao) {
		this.genericDao = genericDao;
	}


	public List<User> getUsers() {
		if (users == null) {
			users = getGenericDao().findAll(User.class);
		}
		return users;
	}
}
